import React, { Component } from "react";
import { View, Text, StatusBar, Button, TouchableHighlight  } from "react-native";
import { StackNavigator, SwitchNavigator, SafeAreaView } from "react-navigation";


// ./MyScene表示的是当前目录下的MyScene.js文件，也就是我们刚刚创建的文件
// 注意即便当前文件和MyScene.js在同一个目录中，"./"两个符号也是不能省略的！
// 但是.js后缀是可以省略的


export default class Pageone extends Component {
    // static propTypes = {//react内置的类型检查
        // title: PropTypes.string.isRequired,
        // onForward: PropTypes.func.isRequired,
        // onBack: PropTypes.func.isRequired,
    //   }
      static navigationOptions = {//将header隐藏
        header: null,
      }
      render() {
        return (
            <View>
            <SafeAreaView
             style={{ backgroundColor: "pink" }}>
            <StatusBar barStyle="light-content" backgroundColor="red" />
            {/* StatusBa设置顶部系统状态栏的颜色 */}
            <Text style={{ color: "#fff" }}>
                Light Screen
            </Text>
            <Button
                title="Next screen"
                onPress={() => this.props.navigation.navigate("Screen2")}
                color="blue"
            />
             </SafeAreaView>
            </View>
        )
      }
}
